package com.main.hotel.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class GlobalException {
    @ExceptionHandler(RuntimeException.class)
    @ResponseBody
    public String runtimeException()
    {
        String s=runtimeException().toString();
        return s;
    }
}
